import pandas as pd
from tools.dbTool import dbTool


class SelectStockTool:
    def getSmallIndexStock(self):
        sql = """
        select *
        from (select *
              from dt_company_20241223
              order by market_value_total desc
              limit 2000 offset 1800) as temp
         where symbol like %s
            or symbol like %s
        """
        res = pd.read_sql(sql, dbTool.getEngine(), params=('SZSE.00%', 'SZSE.60%'))
        return res['symbol']


selectStockTool = SelectStockTool()
